package order;

public class Order {

	public double no1;
	public double no2;
	public double no3;
	
	public Order(double n1, double n2, double n3){
		sort(n1,n2,n3);
	}
	
	private void sort(double n1, double n2, double n3){
		if(n1<n2){
			if(n1<n3){
				no1 = n1;
				if(n2<n3){
					no2 = n2;
					no3 = n3;
				}
				else{
					no2 = n3;
					no3 = n2;
				}
			}
			else{
				no1 = n3;
				no2 = n1;
				no3 = n2;
			}
		}
		else{
			if(n1<n3){
				no1 = n2;
				no2 = n1;
				no3 = n3;
			}
			else{
				no3 = n1;
				if(n2<n3){
					no1 = n2;
					no2 = n3;
				}
				else{
					no1 = n3;
					no2 = n2;
				}
			}
		}
	}

	public double get1st(){
		return no1;
	}
	
	public double get2nd(){
		return no2;
	}
	
	public double get3rd(){
		return no3;
	}
}
